package com.example.activity;

import android.app.ActivityGroup;
import android.app.LocalActivityManager;
import android.content.Intent;
import android.os.Bundle;
import android.view.ViewGroup;

@SuppressWarnings("deprecation")
public class TabActivity extends ActivityGroup
{
  private ViewGroup container;

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
  }

  protected void setContainer(int paramInt)
  {
    this.container = ((ViewGroup)findViewById(paramInt));
  }

  protected void showActivity(Class<?> targetCls)
  {
    Intent localIntent = new Intent(this, targetCls);
    if (this.container.getChildAt(0) != null)
    {
      this.container.removeAllViews();
      getLocalActivityManager().removeAllActivities();
    }
    this.container.addView(getLocalActivityManager().startActivity(targetCls.getName(), localIntent).getDecorView());
  }
}
